@use "tailwindcss" as tw;
@tw.preflight;
@tailwind utilities;

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
    monospace;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes glow {
  from { box-shadow: 0 0 20px rgba(139, 92, 246, 0.3); }
  to { box-shadow: 0 0 30px rgba(139, 92, 246, 0.6); }
}

.bento-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


/* 第一名特殊动画 */
@keyframes champion-glow {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.9);
    transform: scale(1.02);
  }
}

@keyframes crown-bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.champion-card {
  animation: champion-glow 2s ease-in-out infinite;
  position: relative;
  overflow: visible;
}

.champion-card::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
  border-radius: 20px;
  z-index: -1;
  opacity: 0.7;
}

.crown-animation {
  animation: crown-bounce 2s infinite;
  display: inline-block;
}

/* 彩带动画 */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background: #f43f5e;
  animation: confetti-fall 3s linear infinite;
  z-index: 1000;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite alternate;
}

/* 颜色变量 */
:root {
  --bento-purple: #E8E1FF;
  --bento-blue: #E1F3FF;
  --bento-green: #E1FFE8;
  --bento-yellow: #FFF9E1;
  --bento-pink: #FFE1F3;
  --bento-orange: #FFE8E1;
}

/* 实用工具类 */
.bg-bento-purple {
  background-color: var(--bento-purple);
}

.bg-bento-blue {
  background-color: var(--bento-blue);
}

.bg-bento-green {
  background-color: var(--bento-green);
}

.bg-bento-yellow {
  background-color: var(--bento-yellow);
}

.bg-bento-pink {
  background-color: var(--bento-pink);
}

.bg-bento-orange {
  background-color: var(--bento-orange);
}

/* 截断文本 */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


.card-shadow  {
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.card-shadow:hover {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
